import request from '@/utils/request'

// 查询网上信访列表
export function listPetitionLetter(query) {
  return request({
    url: '/comprehensive/petitionLetter/list',
    method: 'get',
    params: query
  })
}

// 查询网上信访详细
export function getPetitionLetter(id) {
  return request({
    url: '/comprehensive/petitionLetter/' + id,
    method: 'get'
  })
}

// 新增网上信访
export function addPetitionLetter(data) {
  return request({
    url: '/comprehensive/petitionLetter',
    method: 'post',
    data: data
  })
}

// 修改网上信访
export function updatePetitionLetter(data) {
  return request({
    url: '/comprehensive/petitionLetter',
    method: 'put',
    data: data
  })
}

// 删除网上信访
export function delPetitionLetter(id) {
  return request({
    url: '/comprehensive/petitionLetter/' + id,
    method: 'delete'
  })
}

// 导出网上信访
export function exportPetitionLetter(query) {
  return request({
    url: '/comprehensive/petitionLetter/export',
    method: 'get',
    params: query
  })
}
// 提交回复信息
export function submitReply(data){
  return request({
    url:'/comprehensive/petitionLetter/replay',
    method: 'post',
    data: data
  })
}

// 完结  /comprehensive/petitionLetter/eng/{id}
export function end(id) {
  return request({
    url: '/comprehensive/petitionLetter/end?id='+ id,
    method: 'post'
  })
}
